package package06章_面向对象编程_基础._03oop.exer3_method;

/**
 * ClassName: EmployeeTest
 * Package: package06章_面向对象编程_基础.oop3.exer3_method
 * Description:
 *
 * @Author lys
 * @Create 2024/1/22 23:34
 * @Version 1.0
 */
public class EmployeeTest {
    public static void main(String[] args) {
        //创建类的实例（或创建类的对象、类的实例化）
        Employee emp1 = new Employee();
        System.out.println(emp1);//类型@地址值


        emp1.id = 1001;
        emp1.name = "Tom";
        emp1.age = 24;
        emp1.salary = 7800;
//        System.out.println("id = " + emp1.id + ",name = " + emp1.name +
//                ", age = " + emp1.age + ", salary = " + emp1.salary);



        //替换为：
        emp1.show();

//        System.out.println(emp1.show());//编译报错

        System.out.println(emp1.show1()); //编译通过


    }
}
